<template>
  <a-card :bordered="false">
    <div class="table-page-search-wrapper">
      <a-form :disabled="true" layout="inline" :model="form" :label-col="{ style: { width: '150px' } }">
        <a-row :gutter="24">
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="用户ID">
              <a-input disabled class="per100" v-model="form.userId" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="用户名">
              <a-input disabled class="per100" v-model="form.userName" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="用户电话">
              <a-input disabled class="per100" v-model="form.mobile" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="wechat_id">
              <a-input disabled class="per100" v-model="form.wechatId" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="地区">
              <a-input disabled v-model="form.district" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="地址">
              <a-input disabled v-model="form.district" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="申请信息">
              <a-input disabled v-model="form.applyMessage" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="状态">
              <j-dict-select-tag
                disabled
                v-model="form.status"
                placeholder="请选择"
                dictCode="businessApplicationStatus"
              />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="审批人">
              <a-input disabled v-model="form.approver" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="审批时间">
              <a-input disabled v-model="form.approveTime" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <a-form-item label="创建时间">
              <a-input disabled v-model="form.createTime" />
            </a-form-item>
          </a-col>
          <a-col :sm="24" :md="12" :xl="24">
            <a-button @click="closeCurrent()">返回</a-button>
          </a-col>
        </a-row>
      </a-form>
    </div>
  </a-card>
</template>

<script>
import CommonApi from '@api/Common'
import { httpAction, getAction } from '@api/manage'
import Api from '@api/CompanyManage/BusinessApply'

export default {
  name: 'MerchantDetail',
  inject: ['closeCurrent'],
  data() {
    return {
      form: {},
      url: {
        detail: Api.queryId
      },
      loading: false
      // provinceOptions: [],
      // cityOptions: [],
      // areaOptions: [],
      // streetOptions: [],
      // networkOptions: []
    }
  },
  created() {
    this.id = this.$route.query.id || ''
    this.getDetails()
  },
  methods: {
    // 获取详情
    getDetails() {
      if (!this.id) {
        return
      }
      getAction(`${this.url.detail}?id=${this.id}`)
        .then(res => {
          if (res.code === 200) {
            this.form = res.result
            console.log('this.form', this.form)
          } else {
            this.$message.error(res.message)
          }
        })
        .finally(() => {
          this.loading = false
        })
    }
  }
}
</script>

<style scoped></style>

